package eventbus;

import com.google.common.eventbus.EventBus;

/**
 * 界面事件总线
 * 采用了google库的事件总线，用于解耦调用关系
 *
 * @author wyl
 */
public final class PageEventBus {
    private static final EventBus bus = new EventBus("page");

    //订阅
    public static void subscribe(Object handleInstance) {
        bus.register(handleInstance);
    }

    //发布事件
    public static void publish(Object event) {
        bus.post(event);
    }


}
